package com.shenhaofeng.app.http.okhttp;

import com.shenhaofeng.app.http.response.ResponseBody;

import java.io.IOException;

import okhttp3.MediaType;


/**
 * Created by Administrator on 2016/10/13.
 */
public class OkResponseBody extends ResponseBody {

    private okhttp3.ResponseBody responseBody;


    public OkResponseBody(okhttp3.ResponseBody responseBody) {
        this.responseBody = responseBody;
    }


    @Override
    public MediaType contentType() {
        return responseBody.contentType();
    }


    @Override
    public long contentLength() {
        return responseBody.contentLength();
    }


    @Override
    protected byte[] readBytes() throws IOException {
        return responseBody.bytes();
    }
}
